package io.noties.markwon.base.core.factory

import io.noties.markwon.base.MarkwonConfiguration
import io.noties.markwon.base.RenderProps
import io.noties.markwon.base.SpanFactory
import io.noties.markwon.base.core.CoreProps
import io.noties.markwon.base.core.spans.HeadingSpan

class HeadingSpanFactory : SpanFactory {
    override fun getSpans(configuration: MarkwonConfiguration, props: RenderProps): Any {
        return HeadingSpan(
            configuration.theme,
            CoreProps.HEADING_LEVEL.require(props)
        )
    }
}